package pms;

import org.eclipse.ui.IFolderLayout;
import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;

import pms.views.AllPatients;
import pms.views.PatientAppointment;
import pms.views.PatientDetails;
import pms.views.TaskViewer;

public class Perspective implements IPerspectiveFactory {

	public void createInitialLayout(IPageLayout layout) {
		String editorArea = layout.getEditorArea();
		layout.setEditorAreaVisible(true);
		
		//layout.addStandaloneView(AllPatients.VIEW_ID, false,IPageLayout.TOP, 0.4f,editorArea);
		layout.addView(AllPatients.VIEW_ID, IPageLayout.BOTTOM, 0.5f,editorArea);
		layout.addStandaloneView(TaskViewer.VIEW_ID, false, IPageLayout.LEFT, 0.25f, editorArea);
		
		// create a tab group with multiple views
		IFolderLayout bottom = layout.createFolder("Patient_Detials_Views", IPageLayout.BOTTOM, 0.6f, AllPatients.VIEW_ID);
		
		bottom.addView(PatientDetails.VIEW_ID);
		bottom.addView(PatientAppointment.VIEW_ID);
		//bottom.addView(TaskViewer.VIEW_ID);
		//layout.addView(PatientDetails.VIEW_ID,IPageLayout.BOTTOM, 0.5f,AllPatients.VIEW_ID);
		//layout.addView(PatientAppointment.VIEW_ID,IPageLayout.LEFT, 0.5f,PatientDetails.VIEW_ID);
		
	}
}
